home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / hydra.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  22KB  |  618 lines

  1. /***************************************************************************
  2.  
  3.     Hydra/Pit Fighter
  4.  
  5. ****************************************************************************/
  6.  
  7.  
  8. #include "driver.h"
  9. #include "sound/adpcm.h"
  10. #include "machine/atarigen.h"
  11. #include "sndhrdw/atarijsa.h"
  12. #include "vidhrdw/generic.h"
  13.  
  14.  
  15. /* Note: if this is set to 1, it must also be set in the vidhrdw module */
  16. #define HIGH_RES 0
  17.  
  18.  
  19. extern struct rectangle hydra_mo_area;
  20. extern UINT32 hydra_mo_priority_offset;
  21. extern INT32 hydra_pf_xoffset;
  22.  
  23.  
  24. static UINT8 which_input;
  25.  
  26.  
  27. WRITE_HANDLER( hydra_playfieldram_w );
  28.  
  29. int hydra_vh_start(void);
  30. void hydra_vh_stop(void);
  31. void hydra_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  32.  
  33. void hydra_scanline_update(int param);
  34. WRITE_HANDLER( hydra_mo_control_w );
  35.  
  36.  
  37.  
  38. /*************************************
  39.  *
  40.  *    Initialization
  41.  *
  42.  *************************************/
  43.  
  44. static void update_interrupts(void)
  45. {
  46.     int newstate = 0;
  47.  
  48.     if (atarigen_video_int_state)
  49.         newstate = 1;
  50.     if (atarigen_sound_int_state)
  51.         newstate = 2;
  52.  
  53.     if (newstate)
  54.         cpu_set_irq_line(0, newstate, ASSERT_LINE);
  55.     else
  56.         cpu_set_irq_line(0, 7, CLEAR_LINE);
  57. }
  58.  
  59.  
  60. static void init_machine(void)
  61. {
  62.     atarigen_eeprom_reset();
  63.     atarigen_slapstic_reset();
  64.     atarigen_interrupt_reset(update_interrupts);
  65.     atarigen_scanline_timer_reset(hydra_scanline_update, 8);
  66.     atarijsa_reset();
  67. }
  68.  
  69.  
  70.  
  71. /*************************************
  72.  *
  73.  *    I/O read dispatch.
  74.  *
  75.  *************************************/
  76.  
  77. static READ_HANDLER( special_port0_r )
  78. {
  79.     int temp = input_port_0_r(offset);
  80.     if (atarigen_cpu_to_sound_ready) temp ^= 0x1000;
  81.     temp ^= 0x2000;        /* A2DOK always high for now */
  82.     return temp;
  83. }
  84.  
  85.  
  86. static WRITE_HANDLER( a2d_select_w )
  87. {
  88.     (void)data;
  89.     which_input = (offset / 2);
  90. }
  91.  
  92.  
  93. static READ_HANDLER( a2d_data_r )
  94. {
  95.     /* Pit Fighter has no A2D, just another input port */
  96.     if (hydra_mo_area.min_x != 0)
  97.         return input_port_1_r(offset);
  98.  
  99.     /* otherwise, assume it's hydra */
  100.     if (which_input < 3)
  101.         return readinputport(1 + which_input) << 8;
  102.  
  103.     return 0;
  104. }
  105.  
  106.  
  107.  
  108. /*************************************
  109.  *
  110.  *    Main CPU memory handlers
  111.  *
  112.  *************************************/
  113.  
  114. static struct MemoryReadAddress main_readmem[] =
  115. {
  116.     { 0x000000, 0x07ffff, MRA_ROM },
  117.     { 0xfc0000, 0xfc0001, special_port0_r },
  118.     { 0xfc8000, 0xfc8001, a2d_data_r },
  119.     { 0xfd0000, 0xfd0001, atarigen_sound_upper_r },
  120.     { 0xfd8000, 0xfdffff, atarigen_eeprom_r },
  121. /*    { 0xfe0000, 0xfe7fff, from_r },*/
  122.     { 0xfe8000, 0xfe89ff, MRA_BANK1 },
  123.     { 0xff0000, 0xff3fff, MRA_BANK2 },
  124.     { 0xff4000, 0xff5fff, MRA_BANK3 },
  125.     { 0xff6000, 0xff6fff, MRA_BANK4 },
  126.     { 0xff7000, 0xffffff, MRA_BANK5 },
  127.     { -1 }  /* end of table */
  128. };
  129.  
  130.  
  131. static struct MemoryWriteAddress main_writemem[] =
  132. {
  133.     { 0x000000, 0x07ffff, MWA_ROM },
  134.     { 0xf80000, 0xf80001, watchdog_reset_w },
  135.     { 0xf88000, 0xf8ffff, atarigen_eeprom_enable_w },
  136.     { 0xf90000, 0xf90001, atarigen_sound_upper_w },
  137.     { 0xf98000, 0xf98001, atarigen_sound_reset_w },
  138.     { 0xfa0000, 0xfa0001, hydra_mo_control_w },
  139.     { 0xfb0000, 0xfb0001, atarigen_video_int_ack_w },
  140.     { 0xfc8000, 0xfc8007, a2d_select_w },
  141.     { 0xfd8000, 0xfdffff, atarigen_eeprom_w, &atarigen_eeprom, &atarigen_eeprom_size },
  142.     { 0xfe8000, 0xfe89ff, atarigen_666_paletteram_w, &paletteram },
  143.     { 0xff0000, 0xff3fff, MWA_BANK2, &atarigen_spriteram, &atarigen_spriteram_size },
  144.     { 0xff4000, 0xff5fff, hydra_playfieldram_w, &atarigen_playfieldram, &atarigen_playfieldram_size },
  145.     { 0xff6000, 0xff6fff, MWA_BANK4, &atarigen_alpharam, &atarigen_alpharam_size },
  146.     { 0xff7000, 0xffffff, MWA_BANK5 },
  147.     { -1 }  /* end of table */
  148. };
  149.  
  150.  
  151.  
  152. /*************************************
  153.  *
  154.  *    Port definitions
  155.  *
  156.  *************************************/
  157.  
  158. INPUT_PORTS_START( hydra )
  159.     PORT_START        /* fc0000 */
  160.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON5 )
  161.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 )
  162.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 )
  163.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 )
  164.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 )
  165.     PORT_BIT( 0x0fe0, IP_ACTIVE_LOW, IPT_UNUSED )
  166.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED )
  167.     PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED )
  168.     PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
  169.     PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK )
  170.  
  171.     PORT_START        /* ADC 0 @ fc8000 */
  172.     PORT_ANALOG( 0x00ff, 0x0080, IPT_AD_STICK_X, 50, 10, 0, 255 )
  173.     PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
  174.  
  175.     PORT_START        /* ADC 1 @ fc8000 */
  176.     PORT_ANALOG( 0x00ff, 0x0080, IPT_AD_STICK_Y, 70, 10, 0, 255 )
  177.     PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
  178.  
  179.     PORT_START      /* ADC 2 @ fc8000 */
  180.     PORT_ANALOG( 0xff, 0x00, IPT_PEDAL, 100, 16, 0x00, 0xff )
  181.  
  182.     JSA_II_PORT        /* audio board port */
  183. INPUT_PORTS_END
  184.  
  185.  
  186. INPUT_PORTS_START( pitfight )
  187.     PORT_START        /* fc0000 */
  188.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 )
  189.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 )
  190.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
  191.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 )
  192.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  193.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  194.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  195.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 )
  196.     PORT_BIT( 0x0f80, IP_ACTIVE_LOW, IPT_UNUSED )
  197.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED )
  198.     PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED )
  199.     PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
  200.     PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK )
  201.  
  202.     PORT_START      /* fc8000 */
  203.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 )
  204.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 )
  205.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
  206.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 )
  207.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  208.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  209.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  210.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START2 )
  211.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
  212.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER3 )
  213.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER3 )
  214.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER3 )
  215.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER3 )
  216.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  217.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  218.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  219.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START3 )
  220.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
  221.  
  222.     PORT_START      /* not used */
  223.     PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
  224.  
  225.     PORT_START      /* not used */
  226.     PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
  227.  
  228.     JSA_II_PORT        /* audio board port */
  229. INPUT_PORTS_END
  230.  
  231.  
  232.  
  233. /*************************************
  234.  *
  235.  *    Graphics definitions
  236.  *
  237.  *************************************/
  238.  
  239. static struct GfxLayout pflayout =
  240. {
  241.     8 << HIGH_RES,8,    /* 8*8 chars */
  242.     16384,    /* 16384 chars */
  243.     5,        /* 5 bits per pixel */
  244.     { 0, 0, 1, 2, 3 },
  245. #if HIGH_RES
  246.     { 0x40000*8+0,0x40000*8+0, 0x40000*8+4,0x40000*8+4, 0,0, 4,4,
  247.         0x40000*8+8,0x40000*8+8, 0x40000*8+12,0x40000*8+12, 8,8, 12,12 },
  248. #else
  249.     { 0x40000*8+0, 0x40000*8+4, 0, 4, 0x40000*8+8, 0x40000*8+12, 8, 12 },
  250. #endif
  251.     { 0*8, 2*8, 4*8, 6*8, 8*8, 10*8, 12*8, 14*8 },
  252.     16*8    /* every char takes 16 consecutive bytes */
  253. };
  254.  
  255. static struct GfxLayout anlayout =
  256. {
  257.     8 << HIGH_RES,8,    /* 8*8 chars */
  258.     4096,    /* 4096 chars */
  259.     4,        /* 4 bits per pixel */
  260.     { 0, 1, 2, 3 },
  261. #if HIGH_RES
  262.     { 0,0, 4,4, 8,8, 12,12, 16,16, 20,20, 24,24, 28,28 },
  263. #else
  264.     { 0, 4, 8, 12, 16, 20, 24, 28 },
  265. #endif
  266.     { 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8 },
  267.     32*8    /* every char takes 32 consecutive bytes */
  268. };
  269.  
  270.  
  271. static struct GfxDecodeInfo gfxdecodeinfo[] =
  272. {
  273.     { REGION_GFX1, 0, &pflayout, 0x300, 8 },
  274.     { REGION_GFX2, 0, &anlayout, 0x100, 16 },
  275.     { -1 } /* end of array */
  276. };
  277.  
  278.  
  279.  
  280. /*************************************
  281.  *
  282.  *    Machine driver
  283.  *
  284.  *************************************/
  285.  
  286. static struct MachineDriver machine_driver_hydra =
  287. {
  288.     /* basic machine hardware */
  289.     {
  290.         {
  291.             CPU_M68000,        /* verified */
  292.             ATARI_CLOCK_14MHz,
  293.             main_readmem,main_writemem,0,0,
  294.             atarigen_video_int_gen,1
  295.         },
  296.         JSA_II_CPU
  297.     },
  298.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  299.     1,
  300.     init_machine,
  301.  
  302.     /* video hardware */
  303.     42*(8 << HIGH_RES), 30*8, { 0*(8 << HIGH_RES), 42*(8 << HIGH_RES)-1, 0*8, 30*8-1 },
  304.     gfxdecodeinfo,
  305.     1024,1024,
  306.     0,
  307.  
  308. #if HIGH_RES
  309.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK | VIDEO_PIXEL_ASPECT_RATIO_1_2,
  310. #else
  311.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  312. #endif
  313.     0,
  314.     hydra_vh_start,
  315.     hydra_vh_stop,
  316.     hydra_vh_screenrefresh,
  317.  
  318.     /* sound hardware */
  319.     JSA_II_MONO(REGION_SOUND1),
  320.  
  321.     atarigen_nvram_handler
  322. };
  323.  
  324.  
  325.  
  326. /*************************************
  327.  *
  328.  *    Driver initialization
  329.  *
  330.  *************************************/
  331.  
  332. static void init_hydra(void)
  333. {
  334.     atarigen_eeprom_default = NULL;
  335.     atarigen_slapstic_init(0, 0x078000, 116);
  336.  
  337.     hydra_mo_area.min_x = 0 << HIGH_RES;
  338.     hydra_mo_area.max_x = 255 << HIGH_RES;
  339.     hydra_mo_area.min_y = 0;
  340.     hydra_mo_area.max_y = 239;
  341.     hydra_mo_priority_offset = 10;
  342.     hydra_pf_xoffset = 0;
  343.  
  344.     atarijsa_init(1, 4, 0, 0x8000);
  345.  
  346.     /* speed up the 6502 */
  347.     atarigen_init_6502_speedup(1, 0x4159, 0x4171);
  348.  
  349.     /* display messages */
  350.     atarigen_show_slapstic_message();
  351.     atarigen_show_sound_message();
  352. }
  353.  
  354.  
  355. static void init_hydrap(void)
  356. {
  357.     atarigen_eeprom_default = NULL;
  358.  
  359.     hydra_mo_area.min_x = 0 << HIGH_RES;
  360.     hydra_mo_area.max_x = 255 << HIGH_RES;
  361.     hydra_mo_area.min_y = 0;
  362.     hydra_mo_area.max_y = 239;
  363.     hydra_mo_priority_offset = 10;
  364.     hydra_pf_xoffset = 0;
  365.  
  366.     atarijsa_init(1, 4, 0, 0x8000);
  367.  
  368.     /* speed up the 6502 */
  369.     atarigen_init_6502_speedup(1, 0x4159, 0x4171);
  370.  
  371.     /* display messages */
  372.     atarigen_show_sound_message();
  373. }
  374.  
  375.  
  376. static void init_pitfight(void)
  377. {
  378.     atarigen_eeprom_default = NULL;
  379.     atarigen_slapstic_init(0, 0x038000, 111);
  380.  
  381.     hydra_mo_area.min_x = 40 << HIGH_RES;
  382.     hydra_mo_area.max_x = (40 + 255) << HIGH_RES;
  383.     hydra_mo_area.min_y = 0;
  384.     hydra_mo_area.max_y = 239;
  385.     hydra_mo_priority_offset = 12;
  386.     hydra_pf_xoffset = 2;
  387.  
  388.     atarijsa_init(1, 4, 0, 0x8000);
  389.  
  390.     /* speed up the 6502 */
  391.     atarigen_init_6502_speedup(1, 0x4159, 0x4171);
  392.  
  393.     /* display messages */
  394.     atarigen_show_slapstic_message();
  395.     atarigen_show_sound_message();
  396. }
  397.  
  398.  
  399.  
  400. /*************************************
  401.  *
  402.  *    ROM definition(s)
  403.  *
  404.  *************************************/
  405.  
  406. ROM_START( hydra )
  407.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  408.     ROM_LOAD_EVEN( "hydr3028.bin", 0x00000, 0x10000, 0x43475f73 )
  409.     ROM_LOAD_ODD ( "hydr3029.bin", 0x00000, 0x10000, 0x886e1de8 )
  410.     ROM_LOAD_EVEN( "hydr3034.bin", 0x20000, 0x10000, 0x5115aa36 )
  411.     ROM_LOAD_ODD ( "hydr3035.bin", 0x20000, 0x10000, 0xa28ba44b )
  412.     ROM_LOAD_EVEN( "hydr1032.bin", 0x40000, 0x10000, 0xecd1152a )
  413.     ROM_LOAD_ODD ( "hydr1033.bin", 0x40000, 0x10000, 0x2ebe1939 )
  414.     ROM_LOAD_EVEN( "hydr1030.bin", 0x60000, 0x10000, 0xb31fd41f )
  415.     ROM_LOAD_ODD ( "hydr1031.bin", 0x60000, 0x10000, 0x453d076f )
  416.  
  417.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  418.     ROM_LOAD( "hydraa0.bin", 0x10000, 0x4000, 0x619d7319 )
  419.     ROM_CONTINUE(            0x04000, 0xc000 )
  420.  
  421.     ROM_REGION( 0x0a0000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  422.     ROM_LOAD( "hydr1017.bin",  0x000000, 0x10000, 0xbd77b747 ) /* playfield, planes 0-3 odd */
  423.     ROM_LOAD( "hydr1018.bin",  0x010000, 0x10000, 0x7c24e637 )
  424.     ROM_LOAD( "hydr1019.bin",  0x020000, 0x10000, 0xaa2fb07b )
  425.     ROM_LOAD( "hydr1020.bin",  0x030000, 0x10000, 0x906ccd98 )
  426.     ROM_LOAD( "hydr1021.bin",  0x040000, 0x10000, 0xf88cdac2 ) /* playfield, planes 0-3 even */
  427.     ROM_LOAD( "hydr1022.bin",  0x050000, 0x10000, 0xa9c612ff )
  428.     ROM_LOAD( "hydr1023.bin",  0x060000, 0x10000, 0xb706aa6e )
  429.     ROM_LOAD( "hydr1024.bin",  0x070000, 0x10000, 0xc49eac53 )
  430.     ROM_LOAD( "hydr1025.bin",  0x080000, 0x10000, 0x98b5b1a1 ) /* playfield plane 4 */
  431.     ROM_LOAD( "hydr1026.bin",  0x090000, 0x10000, 0xd68d44aa )
  432.  
  433.     ROM_REGION( 0x020000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  434.     ROM_LOAD( "hydr1027.bin",  0x000000, 0x20000, 0xf9135b9b ) /* alphanumerics */
  435.  
  436.     ROM_REGION( 0x100000, REGION_GFX3 )
  437.     ROM_LOAD_ODD ( "hydr1001.bin", 0x00000, 0x10000, 0x3f757a53 )
  438.     ROM_LOAD_EVEN( "hydr1002.bin", 0x00000, 0x10000, 0xa1169469 )
  439.     ROM_LOAD_ODD ( "hydr1003.bin", 0x20000, 0x10000, 0xaa21ec33 )
  440.     ROM_LOAD_EVEN( "hydr1004.bin", 0x20000, 0x10000, 0xc0a2be66 )
  441.     ROM_LOAD_ODD ( "hydr1005.bin", 0x40000, 0x10000, 0x80c285b3 )
  442.     ROM_LOAD_EVEN( "hydr1006.bin", 0x40000, 0x10000, 0xad831c59 )
  443.     ROM_LOAD_ODD ( "hydr1007.bin", 0x60000, 0x10000, 0xe0688cc0 )
  444.     ROM_LOAD_EVEN( "hydr1008.bin", 0x60000, 0x10000, 0xe6827f6b )
  445.     ROM_LOAD_ODD ( "hydr1009.bin", 0x80000, 0x10000, 0x33624d07 )
  446.     ROM_LOAD_EVEN( "hydr1010.bin", 0x80000, 0x10000, 0x9de4c689 )
  447.     ROM_LOAD_ODD ( "hydr1011.bin", 0xa0000, 0x10000, 0xd55c6e49 )
  448.     ROM_LOAD_EVEN( "hydr1012.bin", 0xa0000, 0x10000, 0x43af45d0 )
  449.     ROM_LOAD_ODD ( "hydr1013.bin", 0xc0000, 0x10000, 0x2647a82b )
  450.     ROM_LOAD_EVEN( "hydr1014.bin", 0xc0000, 0x10000, 0x8897d5e9 )
  451.     ROM_LOAD_ODD ( "hydr1015.bin", 0xe0000, 0x10000, 0xcf7f69fd )
  452.     ROM_LOAD_EVEN( "hydr1016.bin", 0xe0000, 0x10000, 0x61aaf14f )
  453.  
  454.     ROM_REGION( 0x30000, REGION_SOUND1 )    /* 192k for ADPCM samples */
  455.     ROM_LOAD( "hydr1037.bin",  0x00000, 0x10000, 0xb974d3d0 )
  456.     ROM_LOAD( "hydr1038.bin",  0x10000, 0x10000, 0xa2eda15b )
  457.     ROM_LOAD( "hydr1039.bin",  0x20000, 0x10000, 0xeb9eaeb7 )
  458. ROM_END
  459.  
  460. ROM_START( hydrap )
  461.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  462.     ROM_LOAD_EVEN( "hydhi0.bin", 0x00000, 0x10000, 0xdab2e8a2 )
  463.     ROM_LOAD_ODD ( "hydlo0.bin", 0x00000, 0x10000, 0xc18d4f16 )
  464.     ROM_LOAD_EVEN( "hydhi1.bin", 0x20000, 0x10000, 0x50c12bb9 )
  465.     ROM_LOAD_ODD ( "hydlo1.bin", 0x20000, 0x10000, 0x5ee0a846 )
  466.     ROM_LOAD_EVEN( "hydhi2.bin", 0x40000, 0x10000, 0x436a6d81 )
  467.     ROM_LOAD_ODD ( "hydlo2.bin", 0x40000, 0x10000, 0x182bfd6a )
  468.     ROM_LOAD_EVEN( "hydhi3.bin", 0x60000, 0x10000, 0x29e9e03e )
  469.     ROM_LOAD_ODD ( "hydlo3.bin", 0x60000, 0x10000, 0x7b5047f0 )
  470.  
  471.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  472.     ROM_LOAD( "hydraa0.bin", 0x10000, 0x4000, BADCRC(0x619d7319) )
  473.     ROM_CONTINUE(            0x04000, 0xc000 )
  474.  
  475.     ROM_REGION( 0x0a0000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  476.     ROM_LOAD( "hydr1017.bin",  0x000000, 0x10000, 0xbd77b747 ) /* playfield, planes 0-3 odd */
  477.     ROM_LOAD( "hydr1018.bin",  0x010000, 0x10000, 0x7c24e637 )
  478.     ROM_LOAD( "hydr1019.bin",  0x020000, 0x10000, 0xaa2fb07b )
  479.     ROM_LOAD( "hydpl03.bin",   0x030000, 0x10000, 0x1f0dfe60 )
  480.     ROM_LOAD( "hydr1021.bin",  0x040000, 0x10000, 0xf88cdac2 ) /* playfield, planes 0-3 even */
  481.     ROM_LOAD( "hydr1022.bin",  0x050000, 0x10000, 0xa9c612ff )
  482.     ROM_LOAD( "hydr1023.bin",  0x060000, 0x10000, 0xb706aa6e )
  483.     ROM_LOAD( "hydphi3.bin",   0x070000, 0x10000, 0x917e250c )
  484.     ROM_LOAD( "hydr1025.bin",  0x080000, 0x10000, 0x98b5b1a1 ) /* playfield plane 4 */
  485.     ROM_LOAD( "hydpl41.bin",   0x090000, 0x10000, 0x85f9afa6 )
  486.  
  487.     ROM_REGION( 0x020000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  488.     ROM_LOAD( "hydalph.bin",   0x000000, 0x20000, 0x7dd2b062 ) /* alphanumerics */
  489.  
  490.     ROM_REGION( 0x100000, REGION_GFX3 )
  491.     ROM_LOAD_ODD ( "hydmhi0.bin", 0x00000, 0x10000, 0x3c83b42d )
  492.     ROM_LOAD_EVEN( "hydmlo0.bin", 0x00000, 0x10000, 0x6d49650c )
  493.     ROM_LOAD_ODD ( "hydmhi1.bin", 0x20000, 0x10000, 0x689b3376 )
  494.     ROM_LOAD_EVEN( "hydmlo1.bin", 0x20000, 0x10000, 0xc81a4e88 )
  495.     ROM_LOAD_ODD ( "hydmhi2.bin", 0x40000, 0x10000, 0x77098e14 )
  496.     ROM_LOAD_EVEN( "hydmlo2.bin", 0x40000, 0x10000, 0x40015d9d )
  497.     ROM_LOAD_ODD ( "hydmhi3.bin", 0x60000, 0x10000, 0xdfebdcbd )
  498.     ROM_LOAD_EVEN( "hydmlo3.bin", 0x60000, 0x10000, 0x213c407c )
  499.     ROM_LOAD_ODD ( "hydmhi4.bin", 0x80000, 0x10000, 0x2897765f )
  500.     ROM_LOAD_EVEN( "hydmlo4.bin", 0x80000, 0x10000, 0x730157f3 )
  501.     ROM_LOAD_ODD ( "hydmhi5.bin", 0xa0000, 0x10000, 0xecd061ae )
  502.     ROM_LOAD_EVEN( "hydmlo5.bin", 0xa0000, 0x10000, 0xa5a08c53 )
  503.     ROM_LOAD_ODD ( "hydmhi6.bin", 0xc0000, 0x10000, 0xaa3f2903 )
  504.     ROM_LOAD_EVEN( "hydmlo6.bin", 0xc0000, 0x10000, 0xdb8ea56f )
  505.     ROM_LOAD_ODD ( "hydmhi7.bin", 0xe0000, 0x10000, 0x71fc3e43 )
  506.     ROM_LOAD_EVEN( "hydmlo7.bin", 0xe0000, 0x10000, 0x7960b0c2 )
  507.  
  508.     ROM_REGION( 0x30000, REGION_SOUND1 )    /* 192k for ADPCM samples */
  509.     ROM_LOAD( "hydr1037.bin",  0x00000, 0x10000, BADCRC(0xb974d3d0) )
  510.     ROM_LOAD( "hydr1038.bin",  0x10000, 0x10000, BADCRC(0xa2eda15b) )
  511.     ROM_LOAD( "hydr1039.bin",  0x20000, 0x10000, BADCRC(0xeb9eaeb7) )
  512. ROM_END
  513.  
  514. ROM_START( pitfight )
  515.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  516.     ROM_LOAD_EVEN( "4028", 0x00000, 0x10000, 0xf7cb1a4b )
  517.     ROM_LOAD_ODD ( "4029", 0x00000, 0x10000, 0x13ae0d4f )
  518.     ROM_LOAD_EVEN( "3030", 0x20000, 0x10000, 0xb053e779 )
  519.     ROM_LOAD_ODD ( "3031", 0x20000, 0x10000, 0x2b8c4d13 )
  520.  
  521.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  522.     ROM_LOAD( "1060", 0x10000, 0x4000, 0x231d71d7 )
  523.     ROM_CONTINUE(     0x04000, 0xc000 )
  524.  
  525.     ROM_REGION( 0x0a0000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  526.     ROM_LOAD( "1017",  0x000000, 0x10000, 0xad3cfea5 ) /* playfield, planes 0-3 odd */
  527.     ROM_LOAD( "1018",  0x010000, 0x10000, 0x1a0f8bcf )
  528.     ROM_LOAD( "1021",  0x040000, 0x10000, 0x777efee3 ) /* playfield, planes 0-3 even */
  529.     ROM_LOAD( "1022",  0x050000, 0x10000, 0x524319d0 )
  530.     ROM_LOAD( "1025",  0x080000, 0x10000, 0xfc41691a ) /* playfield plane 4 */
  531.  
  532.     ROM_REGION( 0x020000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  533.     ROM_LOAD( "1027",  0x000000, 0x10000, 0xa59f381d ) /* alphanumerics */
  534.  
  535.     ROM_REGION( 0x200000, REGION_GFX3 )
  536.     ROM_LOAD_ODD ( "1001", 0x000000, 0x20000, 0x3af31444 )
  537.     ROM_LOAD_EVEN( "1002", 0x000000, 0x20000, 0xf1d76a4c )
  538.     ROM_LOAD_ODD ( "1003", 0x040000, 0x20000, 0x28c41c2a )
  539.     ROM_LOAD_EVEN( "1004", 0x040000, 0x20000, 0x977744da )
  540.     ROM_LOAD_ODD ( "1005", 0x080000, 0x20000, 0xae59aef2 )
  541.     ROM_LOAD_EVEN( "1006", 0x080000, 0x20000, 0xb6ccd77e )
  542.     ROM_LOAD_ODD ( "1007", 0x0c0000, 0x20000, 0xba33b0c0 )
  543.     ROM_LOAD_EVEN( "1008", 0x0c0000, 0x20000, 0x09bd047c )
  544.     ROM_LOAD_ODD ( "1009", 0x100000, 0x20000, 0xab85b00b )
  545.     ROM_LOAD_EVEN( "1010", 0x100000, 0x20000, 0xeca94bdc )
  546.     ROM_LOAD_ODD ( "1011", 0x140000, 0x20000, 0xa86582fd )
  547.     ROM_LOAD_EVEN( "1012", 0x140000, 0x20000, 0xefd1152d )
  548.     ROM_LOAD_ODD ( "1013", 0x180000, 0x20000, 0xa141379e )
  549.     ROM_LOAD_EVEN( "1014", 0x180000, 0x20000, 0x93bfcc15 )
  550.     ROM_LOAD_ODD ( "1015", 0x1c0000, 0x20000, 0x9378ad0b )
  551.     ROM_LOAD_EVEN( "1016", 0x1c0000, 0x20000, 0x19c3fbe0 )
  552.  
  553.     ROM_REGION( 0x40000, REGION_SOUND1 )    /* 256k for ADPCM samples */
  554.     ROM_LOAD( "1061",  0x00000, 0x10000, 0x5b0468c6 )
  555.     ROM_LOAD( "1062",  0x10000, 0x10000, 0xf73fe3cb )
  556.     ROM_LOAD( "1063",  0x20000, 0x10000, 0xaa93421d )
  557.     ROM_LOAD( "1064",  0x30000, 0x10000, 0x33f045d5 )
  558. ROM_END
  559.  
  560. ROM_START( pitfigh3 )
  561.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  562.     ROM_LOAD_EVEN( "3028", 0x00000, 0x10000, 0x99530da4 )
  563.     ROM_LOAD_ODD ( "3029", 0x00000, 0x10000, 0x78c7afbf )
  564.     ROM_LOAD_EVEN( "3030", 0x20000, 0x10000, 0xb053e779 )
  565.     ROM_LOAD_ODD ( "3031", 0x20000, 0x10000, 0x2b8c4d13 )
  566.  
  567.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  568.     ROM_LOAD( "1060", 0x10000, 0x4000, 0x231d71d7 )
  569.     ROM_CONTINUE(     0x04000, 0xc000 )
  570.  
  571.     ROM_REGION( 0x0a0000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  572.     ROM_LOAD( "1017",  0x000000, 0x10000, 0xad3cfea5 ) /* playfield, planes 0-3 odd */
  573.     ROM_LOAD( "1018",  0x010000, 0x10000, 0x1a0f8bcf )
  574.     ROM_LOAD( "1021",  0x040000, 0x10000, 0x777efee3 ) /* playfield, planes 0-3 even */
  575.     ROM_LOAD( "1022",  0x050000, 0x10000, 0x524319d0 )
  576.     ROM_LOAD( "1025",  0x080000, 0x10000, 0xfc41691a ) /* playfield plane 4 */
  577.  
  578.     ROM_REGION( 0x020000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  579.     ROM_LOAD( "1027",  0x000000, 0x10000, 0xa59f381d ) /* alphanumerics */
  580.  
  581.     ROM_REGION( 0x200000, REGION_GFX3 )
  582.     ROM_LOAD_ODD ( "1001", 0x000000, 0x20000, 0x3af31444 )
  583.     ROM_LOAD_EVEN( "1002", 0x000000, 0x20000, 0xf1d76a4c )
  584.     ROM_LOAD_ODD ( "1003", 0x040000, 0x20000, 0x28c41c2a )
  585.     ROM_LOAD_EVEN( "1004", 0x040000, 0x20000, 0x977744da )
  586.     ROM_LOAD_ODD ( "1005", 0x080000, 0x20000, 0xae59aef2 )
  587.     ROM_LOAD_EVEN( "1006", 0x080000, 0x20000, 0xb6ccd77e )
  588.     ROM_LOAD_ODD ( "1007", 0x0c0000, 0x20000, 0xba33b0c0 )
  589.     ROM_LOAD_EVEN( "1008", 0x0c0000, 0x20000, 0x09bd047c )
  590.     ROM_LOAD_ODD ( "1009", 0x100000, 0x20000, 0xab85b00b )
  591.     ROM_LOAD_EVEN( "1010", 0x100000, 0x20000, 0xeca94bdc )
  592.     ROM_LOAD_ODD ( "1011", 0x140000, 0x20000, 0xa86582fd )
  593.     ROM_LOAD_EVEN( "1012", 0x140000, 0x20000, 0xefd1152d )
  594.     ROM_LOAD_ODD ( "1013", 0x180000, 0x20000, 0xa141379e )
  595.     ROM_LOAD_EVEN( "1014", 0x180000, 0x20000, 0x93bfcc15 )
  596.     ROM_LOAD_ODD ( "1015", 0x1c0000, 0x20000, 0x9378ad0b )
  597.     ROM_LOAD_EVEN( "1016", 0x1c0000, 0x20000, 0x19c3fbe0 )
  598.  
  599.     ROM_REGION( 0x40000, REGION_SOUND1 )    /* 256k for ADPCM samples */
  600.     ROM_LOAD( "1061",  0x00000, 0x10000, 0x5b0468c6 )
  601.     ROM_LOAD( "1062",  0x10000, 0x10000, 0xf73fe3cb )
  602.     ROM_LOAD( "1063",  0x20000, 0x10000, 0xaa93421d )
  603.     ROM_LOAD( "1064",  0x30000, 0x10000, 0x33f045d5 )
  604. ROM_END
  605.  
  606.  
  607.  
  608. /*************************************
  609.  *
  610.  *    Game driver(s)
  611.  *
  612.  *************************************/
  613.  
  614. GAME( 1990, hydra,    0,        hydra, hydra,    hydra,    ROT0, "Atari Games", "Hydra" )
  615. GAME( 1990, hydrap,   hydra,    hydra, hydra,    hydrap,   ROT0, "Atari Games", "Hydra (prototype)" )
  616. GAME( 1990, pitfight, 0,        hydra, pitfight, pitfight, ROT0, "Atari Games", "Pit Fighter (version 4)" )
  617. GAME( 1990, pitfigh3, pitfight, hydra, pitfight, pitfight, ROT0, "Atari Games", "Pit Fighter (version 3)" )
  618.